/**
 * 菜单类型
 */
export interface Menu {
  id: number;
  parentId: number;
  name: string;
  path: string;
  component: string;
  icon?: string;
  permission?: string;
  type: number; // 0: 目录, 1: 菜单, 2: 按钮
  visible: boolean;
  cache: boolean;
  sort: number;
  children?: Menu[];
}

/**
 * 菜单树节点
 */
export interface MenuTreeNode {
  id: number;
  parentId: number;
  name: string;
  children?: MenuTreeNode[];
}

/**
 * 菜单类型常量
 */
export enum MenuType {
  DIRECTORY = 1,
  MENU = 2,
  BUTTON = 3
}

/**
 * 菜单类型选项
 */
export const menuTypeOptions = [
  { label: '目录', value: MenuType.DIRECTORY },
  { label: '菜单', value: MenuType.MENU },
  { label: '按钮', value: MenuType.BUTTON }
];

/**
 * 是否显示选项
 */
export const visibleOptions = [
  { label: '显示', value: 1 },
  { label: '隐藏', value: 0 }
];

/**
 * 是否缓存选项
 */
export const keepAliveOptions = [
  { label: '缓存', value: 1 },
  { label: '不缓存', value: 0 }
];

/**
 * 是否外链选项
 */
export const externalOptions = [
  { label: '是', value: 1 },
  { label: '否', value: 0 }
]; 